<!-- person -->
<template>
  <div>
    <div>
      <TypeShow :imgsUrl="imgsUrl" :imgsId="imgsId"></TypeShow>
    </div>
  </div>
</template>

<script>
import { BASE_URL } from "../config";
import TypeShow from "../components/TypeShow.vue";
export default {
  data() {
    return {
      imgsUrl: [],
      imgsId: [],
    };
  },
  components: {
    TypeShow,
  },
  methods: {
    async getPersonImagebyId(id) {
      let param = {
        groupId: id,
      };
      let res = await this.$get("/imgcenter/people/getImageByPeople", param);
      let imgList = res.data.image;
      for (var i = 0; i < imgList.length; i++) {
        this.imgsUrl.push(BASE_URL + "/" + imgList[i]["url"]);
        this.imgsId.push(imgList[i]["id"]);
      }
    },
  },
  mounted: function () {
    let id = this.$route.query.id;
    this.getPersonImagebyId(id);
  },
};
</script>

<style lang="scss"  scoped>
</style>
